package com.xp.dto.flow;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 流程定义DTO
 * 
 * @author xp
 * @since 2025-01-01
 */
@Data
@Schema(description = "流程定义DTO")
public class FlowDefinitionDTO {

    @Schema(description = "主键ID")
    private Long id;

    @NotBlank(message = "流程编码不能为空")
    @Schema(description = "流程编码", required = true)
    private String flowCode;

    @NotBlank(message = "流程名称不能为空")
    @Schema(description = "流程名称", required = true)
    private String flowName;

    @Schema(description = "流程描述")
    private String flowDesc;

    @Schema(description = "流程分类")
    private String category;

    @Schema(description = "标签列表")
    private List<String> tags;

    @Schema(description = "流程图数据（JSON字符串）")
    private String flowData;

    @Schema(description = "LiteFlow EL表达式配置")
    private String liteflowConfig;

    @NotBlank(message = "版本号不能为空")
    @Schema(description = "版本号", required = true)
    private String version;

    @Schema(description = "状态：0-草稿，1-已发布，2-已废弃")
    private Integer status;

    @Schema(description = "超时时间（秒）")
    private Integer timeout;

    @Schema(description = "重试次数")
    private Integer retryCount;

    @Schema(description = "错误处理策略")
    private String errorStrategy;

    @Schema(description = "LiteFlow应用名称")
    private String applicationName;

    @Schema(description = "创建人ID")
    private Long creatorId;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "创建者ID")
    private Long createBy;

    @Schema(description = "更新者ID")
    private Long updateBy;
}